<?
require_once("ericdingle/php/PostDate.php");
require_once("ericdingle/model/photo/PhotoEntity.php");

class PostEntity {
	private $postID;
	private $title;
	private $date;
	private $content;
	private $labelIDs;
	private $previewPhoto;
	private $commentCount;
	
	public function __construct($postID = null, $title = null, PostDate $date = null, $content = null, array $labelIDs = array(), PhotoEntity $previewPhoto = null, $commentCount = 0) {		
		$this->setPostID($postID);
		$this->setTitle($title);
		$this->setDate($date ? $date : new PostDate());
		$this->setContent($content);
		$this->setLabelIDs($labelIDs);
		$this->setPreviewPhoto($previewPhoto);
		$this->setCommentCount($commentCount);
	}
	
	public function getPostID() { return $this->postID; }
	public function getTitle() { return $this->title; }
	public function getDate() { return $this->date; }
	public function getContent() { return $this->content; }
	public function getLabelIDs() { return $this->labelIDs; }
	public function getPreviewPhoto() { return $this->previewPhoto; }
	public function getCommentCount() { return $this->commentCount; }
	
	public function setPostID($postID) { $this->postID = $postID; }
	public function setTitle($title) { $this->title = $title; }
	public function setDate(PostDate $date) { $this->date = $date; }
	public function setContent($content) { $this->content = $content; }
	public function setLabelIDs(array $labelIDs) { $this->labelIDs = $labelIDs; }
	public function setPreviewPhoto($previewPhoto) { $this->previewPhoto = $previewPhoto; }
	public function setCommentCount($commentCount) { $this->commentCount = $commentCount; }
}
?>
